package cn.edu.nju.ws.sview.rdf;

public class SupmagicResource extends Resource {
	private int ruleId;
	private int literalPos;
	/**
	 * 
	 * @param id
	 *           
	 */
	SupmagicResource(int ruleId,int literalPos) {
		this.ruleId = ruleId;
		this.literalPos = literalPos;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + literalPos;
		result = prime * result + ruleId;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SupmagicResource other = (SupmagicResource) obj;
		if (literalPos != other.literalPos)
			return false;
		if (ruleId != other.ruleId)
			return false;
		return true;
	}

	public String toString() {
		return "SupmagicResource-" + this.ruleId+":"+this.literalPos;
	}
}
